﻿# -*- coding:UTF-8 -*-
#!/usr/bin/env python

import error404
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
    def get(self):
        if self.request.headers['Host'] in ('youhostname' , 'localhost:8084'):
            return error404.error404(self , path = 'shorturl/404.html')
        else:
            return error404.error404(self)

application = webapp.WSGIApplication(
                                     [('/', MainPage)] ,
                                     debug=True)

def main():
  run_wsgi_app(application)

if __name__ == "__main__":
  main()